{include file="public/head"/}
{include file="public/left"/}
<div class="main-content">
<div class="main-content-inner">
{include file="public/admin_rule"/}
<form method="post" action="{:url('editHandle')}" id="form">
    <input type="hidden" name="id" value="{$arc.id}">
    <div class="row" style="margin:15px 0 0 0">
        <div class="col-xs-12 col-sm-4" id="myleft">
            <div class="panel panel-default">
                <div class="panel-heading">基本信息</div>
                <div class="panel-body" style="position:relative">
		            <div class="tabbable">
		                <table id="simple-table" class="table  table-bordered table-hover">
		                    <tbody>
		                         {if condition="$cjgl EQ 1"}
		                        <tr>
		                            <td  class="cfgtable w100">管理员组:　</td>
		                            <td>
		                                <select name="auth_group_id" id="auth_group_id">
		                                {foreach name="group" item="g"}
		                                <option value="{$g.id}" {if condition="$arc['auth_group_id'] EQ $g['id']"}selected{/if}>{$g.title}</option>
		                                {/foreach}
		                                </select>
		                            </td>
		                        </tr>
		                        {/if}
		                        <tr>
		                            <td class="cfgtable w100">管理账号:　</td>
		                            <td ><input type="text" value="{$arc.admin_name}" {if condition="$admin['auth_group_id'] EQ 1"}name="admin_name"{else/}readonly{/if}></td>
		                        </tr>
		                       
		                        <tr>
		                            <td  class="cfgtable w100">新密码:　</td>
		                            <td><input type="text" name="pass" value=""></td>
		                        </tr>
		                        {if condition="($cjgl EQ 1) AND ($arc['id'] != 1)"}
		                        <tr>
		                           <td  class="cfgtable w100">状态:　</td>
		                            <td>
		                                <div class="checkbox">
		                                    <label style="padding:0 10px" class="w100">
		                                        <input name="admin_status" type="radio" class="ace" value="1" checked>
		                                        <span class="lbl"> 正常使用 </span>
		                                    </label>
		                                    <label style="padding:0 10px">
		                                        <input name="admin_status" type="radio" class="ace" value="0">
		                                        <span class="lbl"> 禁用 </span>
		                                    </label>
		                                </div>
		                            </td>
		                        </tr>
		                        {/if}
		                        <tr><td colspan="2"><input type="submit" value="提交"></td></tr>
		                    </tbody>
		                </table>
                    </div>
                </div>
            </div>    
        </div>
    </div>
</form>
</div>
</div>
{include file="public/foot"/}
<script type="text/javascript">
     $('#form').ajaxForm({
        success : complete,
        dataType : 'json'
    });
    function complete(data){
        if(data.status==0){
            layer.msg(data.msg,{icon:5});
        }
        if(data.status==1){
            layer.msg(data.msg,{icon:6,time:1500},function(){
                window.location.href=data.url;
            });
        }
    }
</script>